﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucPayment.ascx.cs" Inherits="UserControl_ucPayment" %>
<style type="text/css">
    .style1
    {
        width: 100%;
    }
    .btTitle
    {
        font-size: 13px;
        font-weight: bold;
        color: #00B0E4;
        font-family: Tahoma, Arial;
    }
</style>

<script type="text/javascript">
    function UpdateParentsCart(val) {
        if (window.parent.SetShoppingCart != null)
            window.parent.SetShoppingCart(val);
    }
</script>

<script language="javascript" type="text/javascript">
    function UpdatePayment() {
        tb_remove();
        window.parent.location = "Index.aspx";
    }
</script>

<div style="text-align: left">
    <div class="btTitle" style="text-align: left;">
        Confirm Order</div>
    <table cellpadding="0" cellspacing="0" border="0" style="margin-top: 5px">
        <tr>
            <td style="width: 70px">
            </td>
            <td>
                <table cellpadding="2" cellspacing="2" border="0">
                    <tr>
                        <td>
                            Email:
                            <asp:Label ID="lb_email" runat="server" Style="font-weight: bold; text-decoration: underline;"> </asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Date book:
                            <asp:Label ID="lb_OrderDate" runat="server"> </asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>Information Account</b>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Name:
                            <asp:Label ID="lb_name" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Mobile Phone:
                            <asp:Label ID="lb_phone" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Address:
                            <asp:Label ID="lb_address" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div class="btTitle" style="text-align: left;">
        Shopping Cart</div>
                <asp:GridView ID="grdShoppingCart" runat="server" AutoGenerateColumns="False" CellPadding="10"
                    CssClass="grd" GridLines="None" Width="100%" OnRowDataBound="grdShoppingCart_RowDataBound">
                    <Columns>
                        <asp:TemplateField HeaderText="Number">
                            <ItemTemplate>
                                <%# Container.DataItemIndex + 1 %>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Height="30px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Email">
                            <ItemTemplate>
                                <%# Eval("TblEmail.EmailAddress")%>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="true" HorizontalAlign="Center" Width="205px" Wrap="True" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Price">
                            <ItemTemplate>
                                <asp:Label ID="lb" runat="server" Text="$"></asp:Label>
                                <asp:Label ID="lblPrice" runat="server" CssClass="clsPriceCart" Text='<%# Eval("Price") %>'></asp:Label>
                                <asp:Label ID="lblMatchedPrice" runat="server" CssClass="clsPriceCartMatched" Text="0"></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="90" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Quantity">
                            <ItemTemplate>
                                <asp:Label ID="txtQuantity" runat="server" Text='1'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="90px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Total Amount">
                            <ItemTemplate>
                                <asp:UpdatePanel ID="updatePnlGrid" runat="server">
                                    <ContentTemplate>
                                        <%# (double.Parse(Eval("Quantity").ToString()) * double.Parse(Eval("Price").ToString())).ToString("c")%>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100" />
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="clsGrdHeader" />
                    <RowStyle CssClass="clsGrdRow" />
                    <AlternatingRowStyle CssClass="clsGrdAlternateRow" />
                    <PagerStyle CssClass="clsPage" />
                </asp:GridView>
   
    <asp:Panel ID="pnlCartFooter" runat="server">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <%--<tr>
                <td style="text-align: right;" align="right">
                    Estimated Delivery Fee :
                    <asp:Label ID="lblDeliveryFee" runat="server" Text="NA" Font-Bold="true"></asp:Label>
                </td>
            </tr>--%>
            <tr>
                <td style="text-align: right; padding: 4px 0 10px 0; background-image: none; background-repeat: repeat;
                    background-color: slategrey;" valign="middle">
                    <span style="color: #FFFFFF">Total Amount: </span><b>
                        <asp:Label ID="lblTotal" runat="server" CssClass="clsTotalPriceCart" Style="color: #FFFFFF"></asp:Label></b>
                    <span style="color: #FFFFFF">&nbsp;(VAT)</span>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <div class="btTitle" style="text-align: left; margin-top: 10px">
        Payment Method</div>
    <div>
        <table class="style1" style="margin-top: 10px">
            <tr>
                <td>
                    <asp:RadioButton ID="rd1" runat="server" Text="By Cash" Checked="true" GroupName="radio" />
                    <img src="images/cash.gif" alt="" width="80" height="50" />
                </td>
                <td>
                    <asp:RadioButton ID="rd2" runat="server" Text="Paypal" GroupName="radio" />
                    <img src="images/paypal.jpeg" alt="" width="100" height="50" />
                </td>
                <td>
                    <asp:RadioButton ID="rd3" runat="server" Text="Visa" GroupName="radio" />
                    <img src="images/visa.jpeg" alt="" width="100" height="50" />
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td style="height: 50px; padding-left: 75px">
                    <asp:Button ID="btnPayment" runat="server" Style="color: white; border-radius: 8px 0 8px 0;
                        padding: 6px; background: none repeat scroll 0px 0px #00B0E4;" ToolTip="Payment"
                        Text="Payment" OnClick="btnPayment_Click" />
                </td>
            </tr>
        </table>
    </div>
</div>
